package t327.pojo.until;

import com.baidu.aip.face.AipFace;
import com.baidu.aip.face.MatchRequest;
import org.json.JSONObject;

import java.util.ArrayList;

public class BaiDuFaceUntil {


    private  static AipFace aipFace;

    static{
        aipFace= new AipFace(
                "35363817","n5av08fqtNIGSiYRhtIeu5K4","UvsajbIn3H5s1Uj4HyPnZuaOgm81C9Mg");

    }
/**
 * @Author 10202
 * @Description 描述
 * @Date 2023/5/29 14:35
 * @param image1 图片一
 * @param image2
 *
 * @return void
 **/
public JSONObject faceCompare(String image1, String image2) {

    // image1/image2也可以为url或facetoken, 相应的imageType参数需要与之对应。
    MatchRequest req1 = new MatchRequest(image1, "BASE64");
    MatchRequest req2 = new MatchRequest(image2, "BASE64");
    ArrayList<MatchRequest> requests = new ArrayList<MatchRequest>();
    requests.add(req1);
    requests.add(req2);

    return  aipFace.match(requests);


}







}
